package facade;

import java.util.Collection;

import javax.ejb.EJB;
import javax.ejb.Stateless;

import model.Cliente;
import dao.ClienteDAOLocal;
import dao.ItemNaoEncontradoException;
import dao.OrdemServicoDAOLocal;

/**
 * Session Bean implementation class OsMoveisFacade
 */
@Stateless
public class OsMoveisFacade implements OsMoveisFacadeLocal {
	@EJB
	private ClienteDAOLocal clienteDAO;
	@EJB
	private OrdemServicoDAOLocal osDAO;
	
	
	
	
	@Override
	public Collection<Cliente> findClientes() {
		return clienteDAO.findClientes();
	}

	@Override
	public void gravaCliente(String cpf, String end, String nome, String tel) {
		//clienteDAO.grava(cpf, end, nome, tel);
	}

	@Override
	public Collection<Cliente> findClientesByTel(String tel, String ddd) throws ItemNaoEncontradoException {
		return clienteDAO.findClientesByTel(tel, ddd);
	}

	@Override
	public long gravaOS(String descProbl, Integer idCliente, Character tipoServico) {
		return osDAO.grava(descProbl, idCliente, tipoServico);
		}

}
